Global Index
HTML5 JS API Index > Canvas Tutorials & Specs

CanvasGradient

Operations
void
addColorStop(double offset, DOMString color)
The addColorStop(offset, color) method on the CanvasGradient interface adds a new stop to a gradient. If the offset is less than 0 or greater than 1 then an IndexSizeError exception must be thrown. If the color cannot be parsed as a CSS <color> value, then a SyntaxError exception must be thrown.
Referenced by
CanvasRenderingContext2DstrokeStyle